<?php

namespace App\Http\Controllers;

use App\Http\Service\AdmindeletelogService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;

class AdmindeletelogController extends BaseController
{
    private $getRules=[
            'unique_id'=> 'required',
            'people_id'=> 'required',
        ];
    private  $getRulesMessage=[
            'unique_id.required'=> '唯一标识【unique_id】不能为空',
            'people_id.required'=> '用户id【people_id】不能为空',
        ];
    public $repository;
    public function __construct(AdmindeletelogService $repository)
    {
        parent::__construct();
        $this->repository = $repository;
    }
    //爆料-豆瓣-违规通知
    public function getList(Request $request)
    {
        
        $data=[
            'people_id'=>$request->json("people_id"),
            'limit'=>$request->json("limit"),
            'page'=>$request->json("page"),
            'type'=>$request->json("type"),
        ];
        $this->success($this->repository->getList($request,$data));
    }

    //爆料-管理员帖子删除
    public function addAdminDate(Request $request)
    {
        $data=[
            'ids'=>$request->json("ids"),
            'content'=>$request->json("content"),
            'user_id'=>$request->json("user_id"),
            'type'=>1,
            
        ];

       
        $this->success($this->repository->addDate($request,$data));

    }
    //爆料-删除
    public function del(Request $request)
    {
        $ids = $request->json('id');
        if(empty($ids)){
            $this->error('参数错误');
        }
        $data=[
        
        ];
        $this->repository->del($request,$data,$ids);
    }

    

  

}
